<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>挑水</title>
</head>
<body>
    <script>
        //总水升
        var target = 50;
        //当前
        var now = 15;
        //第一次
        var i = 1;

        //第i-1次符合要求
        while(5*i+now<=target){
            i++;
        }
        console.log('小和尚要挑'+(i-1)+'次水才可以把水缸挑满');

    </script>
</body>
</html>